#include <iostream>
using namespace std;

int main() {
    double array[5] = {1000.0,2.0,3.4,17.0,50.0};
    double *p;

    p = array;

    cout << "使用指针的数组值 " << endl;
    for (int i = 0;i < 5;i++) {
        cout << "*(p + " << i << ") :";
        cout << *(p + i) << endl;
    } 

    cout << "使用 array 作为地址的数组值 " << endl;
    for (int  i = 0; i < 5; i++)
    {
        cout << "*(array + " << i << ") :";
        cout << *(array + i) << endl;
    }
    
    return 0;
}